package com.lanyam.travel.base.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author rosson
 * @since 2020-01-24
 */
public class Role extends Model<Role> {

    private static final long serialVersionUID = 1L;

    @JsonProperty(value="id")
    private String id;
    /**
     * 角色中文名称
     */
    @JsonProperty(value="description")
    private String description;
    /**
     * 角色英文名称
     */
    @JsonProperty(value="role")
    private String role;
    /**
     * 角色权重，范围0-99，值越大，权限越大
     */
    @JsonProperty(value="power")
    private int power;
    
    @JsonProperty(value="createDate")
    private Date createDate;
    
    @JsonProperty(value="permissionInRole")
    @TableField(exist = false)
    private List<Permission> permissionInRole;
    
    @JsonProperty(value="permissionIds")
    @TableField(exist = false)
    private List<Integer> permissionIds;

    @JsonProperty(value="menuIds")
    @TableField(exist = false)
    private List<String> menuIds;

    @JsonProperty(value="menuInRole")
    @TableField(exist = false)
    private List<TravelMenu> menuInRole;
    

	public List<TravelMenu> getMenuInRole() {
		return menuInRole;
	}

	public void setMenuInRole(List<TravelMenu> menuInRole) {
		this.menuInRole = menuInRole;
	}

	public List<String> getMenuIds() {
		return menuIds;
	}

	public void setMenuIds(List<String> menuIds) {
		this.menuIds = menuIds;
	}

	public List<Integer> getPermissionIds() {
		return permissionIds;
	}

	public void setPermissionIds(List<Integer> permissionIds) {
		this.permissionIds = permissionIds;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public int getPower() {
		return power;
	}

	public void setPower(int power) {
		this.power = power;
	}

	public List<Permission> getPermissionInRole() {
		return permissionInRole;
	}

	public void setPermissionInRole(List<Permission> permissionInRole) {
		this.permissionInRole = permissionInRole;
	}

	public String getId() {
        return id;
    }

    public Role setId(String id) {
        this.id = id;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public Role setDescription(String description) {
        this.description = description;
        return this;
    }

    public String getRole() {
        return role;
    }

    public Role setRole(String role) {
        this.role = role;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Role{" +
        ", id=" + id +
        ", description=" + description +
        ", role=" + role +
        "}";
    }
}
